﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using VisionCloud.Core.Model.Sys;

namespace VisionCloud.Domain.Repository.Interface.Sys
{
    public interface ISysUserUpdateRecordRepository : IBaseRepository<SysUserUpdateRecord>
    {
        /// <summary>
        /// 获取当前用户未升级的最新一条数据
        /// </summary>
        /// <param name="userId"></param>
        /// <returns></returns>
        SysUserUpdateRecord GetLastRecordForUser(Guid userId);
        /// <summary>
        /// 根据mac地址和版本获取最新版本记录。用于判断切换用户是否需要更新数据。
        /// </summary>
        /// <param name="deviceMac"></param>
        /// <param name="version"></param>
        /// <returns></returns>
        SysUserUpdateRecord GetRecord(string deviceMac, string version);
    }
}
